/** Interactive Surface  FYP- 25 Interactive Surface FYP- 25 Interactive Surface FYP- 25
 *
 *  @author Acer
 */

package objectExtraction;

import com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_core.*;

/** Interactive Surface FYP- 25 Interactive Surface FYP- 25 Interactive Surface FYP- 25
 *  General Information about this class -
 *  Comments -
 */

public class RGBSkinDetector {

    CvScalar rgba_min = cvScalar(124, 133, 18, 0);
    CvScalar rgba_max = cvScalar(184, 193, 80, 0);

    IplImage detectSkin(IplImage image) {
        IplImage imgHSV = cvCreateImage(cvGetSize(image), 8, 3);
        IplImage imgThreshold = cvCreateImage(cvGetSize(image), 8, 1);

        cvInRangeS(imgHSV, rgba_min, rgba_max, imgThreshold);
        return imgThreshold;
    }
}
